﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MainMenu.ascx.cs" Inherits="Tenmah.Web.MainMenu" %>
<script type="text/javascript">
    function MainMenuShow()
    {        
        document.getElementById("MainMenu").style.visibility = "visible";
    }
    function MainMenuHide()
    {
        document.getElementById("MainMenu").style.visibility = "hidden";
    }    
</script>    
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/menu.xml" XPath="mainMenu/item"></asp:XmlDataSource>
<input id="MainMenuButton" type="button" onclick="MainMenuShow()" value="Меню" style="background: url('../images/menu_button.jpg') no-repeat; border: none; color: #ffffff; font: bold 9pt Verdana; height: 25px; width: 60px;" />
    <div id="MainMenu" style="position: absolute; visibility: hidden; left: 10px; top: 35px;" onmouseover="MainMenuShow()" onmouseout="MainMenuHide()">
        <asp:Repeater ID="MainMenuRepeater" runat="server" DataSourceID="XmlDataSource1">
            <HeaderTemplate>
                <table border="0" cellpadding="0" cellspacing="0" class='<%# this.MenuCssClass %>'>                    
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td style="padding: 4px;" class='<%# this.MenuItemCssClass %>'>
                        <asp:LinkButton ID="MainMenuItemLinkButton" runat="server"
                            PostBackUrl='<%# Eval("url") %>'
                            Text='<%# Eval("title") %>'  />
                    </td>                            
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
   </div>     

